package benny_driving_ser.dao;

import java.util.List;

import benny_driving_ser.entity.Form;

public interface FormDao {
	/**
	 * 用户生成订单
	 * 
	 * @param userid
	 * @param startPos
	 * @param desPos
	 * @param exCost
	 * @param exmil
	 * @param sertime
	 * @param username
	 * @param usertel
	 * @return
	 */
	String createForm(int userid, String startPos, String desPos, String exCost,
			String exmil, long sertime, String username, String usertel);

	/**
	 * �û���ɵ绰����
	 * 
	 * @param userid
	 * @param driid
	 * @return
	 */
	int createFormByCall(int userid, int driid);

	/**
	 * �û�ԤԼ������ѯ
	 * 
	 * @param userid
	 * @return
	 */
	List<Form> queryForms(int userid);

	/**
	 * ˾�������ز�ѯ
	 * 
	 * @param driid
	 * @return
	 */
	List<Form> queryAllForms(int driid);

	/**
	 * 司机抢单
	 * 
	 * @param formid
	 * @param driid
	 * @return
	 */
	int selectForm(int formid, int driid);

	/**
	 * ˾���ѽӶ�����ѯ
	 * 
	 * @param driid
	 * @return
	 */
	Form querySelectedForms(int driid);

	/**
	 * 用户补充订单
	 * 
	 * @param formid
	 * @param startpos
	 * @param despos
	 * @param exmil
	 * @param sertime
	 * @param excost
	 * @return
	 */
	int addForm(int formid, String startpos, String despos, String exmil,
			String sertime, String excost);
}
